package com.ternnetwork.core.accesscontroll.service;

import com.ternnetwork.core.accesscontroll.dto.UserDto;
import com.ternnetwork.core.accesscontroll.dto.UserEditDto;
import com.ternnetwork.core.accesscontroll.dto.UserProfileDto;
import org.springframework.data.domain.Pageable;

import com.ternnetwork.commons.model.http.BaseResponse;
import com.ternnetwork.core.accesscontroll.dto.UserQueryDto;
import com.ternnetwork.core.accesscontroll.entity.User;

import java.util.List;

public interface UserService {
	
	
	BaseResponse getOne(Long id);
	
    BaseResponse add(UserDto t)throws Exception;
   
    BaseResponse update(UserEditDto dto)throws Exception;
	
    BaseResponse findByPage(Pageable pageable,UserQueryDto dto);
   
    BaseResponse deleteById(Long id);
	
    User findByName(String name);

    List<User> findByRoleName(String nameEn);

    BaseResponse updatePassword(String orinPassword,String newPassword,String confirmNewPassword,String userName)throws Exception;

    BaseResponse updateProfile(UserProfileDto dto, String userName);

    BaseResponse findAllExceptName(String name,String likeName);

    BaseResponse countByRoleCode();

    BaseResponse updatePhoto(String photo,String userName);

    BaseResponse isWeChatUserExist(String openId);

}
